<template>
  <div class="type-selector">
    <el-radio-group :model-value="modelValue" @change="changeType($event)">
      <el-radio v-for="t in typeArr" :key="t.value" :label="t.value">
        {{ t.label }}
      </el-radio>
    </el-radio-group>
  </div>
</template>

<script setup lang="ts">
defineProps(['modelValue', 'typeArr'])
const emit = defineEmits(['update:modelValue'])
const changeType = (val: string | number | boolean) => {
  emit('update:modelValue', val)
}
</script>
